package com.easylinkin.linkappapi.space.entity;

import java.util.Date;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

/**
 * <p>空间</p>
 *
 * @author liuming
 * @since 2020-04-14
 */
@TableName("linkapp_space")
@Data
@ApiModel("空间实体类")
public class LinkappSpace extends Model<LinkappSpace> {

    @TableId
    @Length(max = 32, message = "id 超长")
    @ApiModelProperty(value = "主键ID", required = false, example = "")
    private String id;

    @TableField("space_name")
    @Length(max = 50, message = "schemeName超长")
    @ApiModelProperty(value = "空间名称", required = false, example = "")
    private String spaceName;

    @TableField("space_no")
    @ApiModelProperty(value = "空间编号", required = false, example = "")
    private String spaceNo;

    @TableField("short_name")
    @ApiModelProperty(value = "端名称", required = false, example = "")
    private String shortName;

    @TableField("sort_no")
    @ApiModelProperty(value = "排序号", required = false, example = "0")
    private Integer sortNo;

    /**
     * 状态 0.删除，1.有效
     */
    @TableField("status")
    @TableLogic(value = "1", delval = "0")
    @ApiModelProperty(value = "删除状态", required = false, example = "")
    private String status;

    @TableField("longitude")
    @ApiModelProperty(value = "经度", required = false, example = "")
    private String longitude;

    @TableField("latitude")
    @ApiModelProperty(value = "纬度", required = false, example = "")
    private String latitude;

    @TableField("province")
    @ApiModelProperty(value = "省", required = false, example = "")
    private String province;

    @TableField("city")
    @ApiModelProperty(value = "市", required = false, example = "")
    private String city;

    @TableField("city_code")
    @ApiModelProperty(value = "城市编码", required = false, example = "")
    private String cityCode;

    @TableField("district")
    @ApiModelProperty(value = "区", required = false, example = "")
    private String district;

    @TableField("site")
    @ApiModelProperty(value = "位置", required = false, example = "")
    private String site;

    /**
     * 1是室内 2是室外
     */
    @TableField("type")
    @ApiModelProperty(value = "是否室内", required = false, example = "1")
    private Integer type;

    @TableField("parent_id")
    @ApiModelProperty(value = "父ID", required = false, example = "")
    private String parentId;

    @TableField("remark")
    @ApiModelProperty(value = "备注", required = false, example = "")
    private String remark;

    @TableField("create_time")
    @ApiModelProperty(value = "创建时间", required = false, example = "")
    private Date createTime;

    @TableField("creator")
    @ApiModelProperty(value = "创建人", required = false, example = "")
    private String creator;

    @TableField("modify_time")
    @ApiModelProperty(value = "修改时间", required = false, example = "")
    private Date modifyTime;

    @TableField("modifier")
    @ApiModelProperty(value = "修改人", required = false, example = "")
    private String modifier;

    @TableField("tenant_id")
    @ApiModelProperty(value = "租户ID", required = false, example = "")
    private String tenantId;

    /**
     * 室内空间设置
     */
    @TableField("map_id")
    @ApiModelProperty(value = "室内空间设置", required = false, example = "")
    private String mapId;

    /**
     * 地图范围
     */
    @TableField(value = "map_polygon_path", strategy = FieldStrategy.IGNORED)
    @ApiModelProperty(value = "地图范围", required = false, example = "")
    private String mapPolygonPath;

}
